const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'main.js'
  },
  module: {
    rules: [{
      test: /\.(png|jpg|jpeg|bmp|gif)$/,
      use: {
        loader: 'url-loader',
        options: {
          // 限制转换为base64的大小
          limit: 8 * 1024
        }
      }
    }]
  }
}
